import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import MusicBox from '../views/MusicBox.vue'
import MyMusic from '../views/MyMusic.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      redirect: '/music-box',
      children: [
        {
          path: '/music-box',
          component: MusicBox
        },
        {
          path: '/my-music',
          component: MyMusic
        }
      ]
    }
  ]
})

export default router
